oracle.hadoop.balancer.examples.invindx

## Class InvertedIndex.InvertedIndexKey.WordPartitioner<V>

- java.lang.Object
- - org.apache.hadoop.mapreduce.Partitioner<InvertedIndex.InvertedIndexKey,V>
  - - oracle.hadoop.balancer.examples.invindx.InvertedIndex.InvertedIndexKey.WordPartitioner<V>

- All Implemented Interfaces:
    org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Partitioner<InvertedIndex.InvertedIndexKey,V>
  Enclosing class:
    InvertedIndex.InvertedIndexKey

      public static class InvertedIndex.InvertedIndexKey.WordPartitioner<V>
      extends org.apache.hadoop.mapreduce.Partitioner<InvertedIndex.InvertedIndexKey,V>
      implements org.apache.hadoop.mapred.Partitioner<InvertedIndex.InvertedIndexKey,V>

  Partition on the word's hash code. This class extends org.apache.hadoop.mapreduce.Partitioner and implements org.apache.hadoop.mapred.Partitioner, so it can be used by both mapred and mapreduce versions of Inverted Index

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvertedIndex.InvertedIndexKey.WordPartitioner()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(org.apache.hadoop.mapred.JobConf conf)`
    `int` | `getPartition(InvertedIndex.InvertedIndexKey key, V value, int numPartitions)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InvertedIndex.InvertedIndexKey.WordPartitioner

          public InvertedIndex.InvertedIndexKey.WordPartitioner()

  - ### Method Detail

    - #### configure

          public void configure(org.apache.hadoop.mapred.JobConf conf)

      Specified by:
        `configure` in interface `org.apache.hadoop.mapred.JobConfigurable`

    - #### getPartition

          public int getPartition(InvertedIndex.InvertedIndexKey key,
                         V value,
                         int numPartitions)

      Specified by:
        `getPartition` in interface `org.apache.hadoop.mapred.Partitioner<InvertedIndex.InvertedIndexKey,V>`
      Specified by:
        `getPartition` in class `org.apache.hadoop.mapreduce.Partitioner<InvertedIndex.InvertedIndexKey,V>`

Copyright © 2013, 2016, Oracle and/or its affiliates. All rights reserved.